package com.iplant.wms.service.basicenum.mrp;

import com.iplant.base.po.enums.BaseEnum;

/**
 * 物料配送需求状态
 *
 * @author femi
 * @CreateTime 2020-1-19 11:09:21
 * @date  2023-8-30 11:09:25
 */
public enum MRPDeliveryStatus implements BaseEnum {
    /**
     * 默认 固定值
     */
    Default(0, "默认"),
    /**
     *待配送
     */
    Todo(1, "待配送"),
    /**
     * 执行中
     */
    Doing(2, "执行中"),
    /**
     * 完成
     */
    Done(3, "完成"),

    /**
     * 取消
     */
    Cancel(4, "取消");

    private int value;
    private String label;
    private String remark;

    MRPDeliveryStatus(int value, String label) {
        this.value = value;
        this.label = label;
    }

    /**
     * 通过 value 的数值获取枚举实例
     *
     * @param val int
     * @return  enum
     */
    public static MRPDeliveryStatus getEnumType(int val) {
        for (MRPDeliveryStatus type : MRPDeliveryStatus.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return Default;
    }

    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    @Override
    public void setValue(int wValue) {
        this.value=wValue;
    }

    @Override
    public void setLabel(String wLabel) {
        this.label = wLabel;
    }

    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
